package com.itjavas.cslp2.mapper;

import com.itjavas.cslp2.pojo.entity.Comment;
import com.itjavas.cslp2.service.CommentService;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
@Mapper
@Repository
public interface CommentMapper {
    //增加评论
    @Insert("insert into comment (value,user_id,course_id,time) values " +
            "(#{value},#{userId},#{courseId},#{time})")
    Boolean addComment(Comment comment);

    //删除评论
    @Delete("delete from comment where id=#{id}")
    Boolean deleteComment(String id);
}
